﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System
{
    public static class DateTimeExtensions
    {
        public static bool IsSameDay(this DateTime source, DateTime date)
        {
            return source.Year == date.Year &&
                   source.Month == date.Month &&
                   source.Day == date.Day;
        }

        public static DateTime Yesterday(this DateTime source)
        {
            return source.AddDays(-1);
        }

        public static DateTime Tomorrow(this DateTime source)
        {
            return source.AddDays(+1);
        }
    }
}
